/**
 * Created by will on 2017/9/28.
 */
$(function () {
    layui.use(['form', 'laypage', 'laydate'], function(){
        var form = layui.form,
            laypage=layui.laypage
        //全选
        form.on('checkbox(allchoose)', function(data){
            var child = $(data.elem).parents('table').find('tbody input[type="checkbox"]');
            child.each(function(index, item){
                item.checked = data.elem.checked;
            });
            form.render('checkbox');
        });
        laypage.render({
            elem: 'paid-paging'
            , count: 100
            , theme: '#45A2FF'
            , groups: 4
            , layout: ['prev', 'page', 'next', 'skip']
            , jump: function (obj) {
                console.log(obj)
            }
        });
    })
})